<template>
  <div class="My">
    <!-- <van-nav-bar left-arrow title="个人中心" @click-left="backHome"></van-nav-bar> -->
    <nav-bar :title="'证书'"></nav-bar>
    <div class="My-wrap">
      <div class="My-menu">
        <van-cell-group>
          <van-cell title="姓名" :value="bookObj.licensee" />
          <van-cell title="证书名字" :value="bookObj.name" />
          <van-cell title="证书编号" :value="bookObj.number"> </van-cell>
        </van-cell-group>
      </div>
      <div class="img_box" v-if="false">
        <van-image style="width: 100%" :src="bookObj.imgUrl">
          <template v-slot:error>暂无证书图片</template>
        </van-image>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import navBar from "@/components/NavBar";
export default {
  components: {
    navBar,
  },
  name: "My",
  data() {
    return {
      imgUrl: config.imgUrl,
      bookObj: {},
    };
  },
  computed: {},
  methods: {},
  mounted() {
    this.$request({
      url: "/certificate/findCertificate",
      data: { ...this.$route.query },
      method: "post",
    }).then((rsp) => {
      console.log(rsp);
      this.bookObj = rsp.data;
      if (rsp.code === 200) {
      } else {
      }
    });
  },
};
</script>

<style lang='scss'>
@import "../assets/css/base";
.img_box {
  padding: 0 px2rem(30);
  width: 100%;
  height: 100%;
  margin-top: 30px;
  box-sizing: border-box;
}
</style>
